In a coding system H.264 and subsequent next-generation coding systems, five modes are proposed as prediction modes in a bi-directive picture. These modes include an intra-frame coding (Intra), a forward prediction coding (Forward Prediction), a backward prediction coding (Backward Prediction), a bi-directive prediction coding (Bi-directive Prediction), and a direct-mode (Direct Mode).
This direct-mode is a coding mode for paying attention to a succession of videos and deciding a motion vector of a current MB from motion vectors of temporally and spatially adjacent MBs (macroblocks). The direct-mode contributes to an improvement of coding efficiency from a standpoint of enhancing a spatio-temporal correlation of the motion and also avoiding a transmission of information related to the motion vectors.
On the other hand, the bi-directive prediction in the coding of H.264 is realized from predictions in a List0 direction and a List1 direction. In general, List0 is a forward direction, and List1 is a backward direction. A reason why these directions are referred to as List0 and List1 instead of forward direction and backward direction is that a forward/forward bi-directive prediction and a backward/backward bi-directive prediction may be carried out in addition to the forward/backward bi-directive prediction.
Also, since a plurality of references may be carried out in respective reference directions, a picture unit is assigned with a number of a reference index Ref_idx. According to the direct-mode, by using a motion vector indicated by a same position MB of a reference picture having a smallest Ref_idx of List1 direction (future, in general) as a reference, two motion vectors are obtained. These two motion vectors are basically forward and backward motion vectors.
It should be noted that in the following description, the motion vector functioning as the reference is referred to as reference vector, and the obtained motion vector is referred to as direct vector.
Also, for the direct-mode, two modes including a temporal direct-mode and a spatial direct-mode exist.
FIG. 1 is an explanatory diagram for describing the temporal direct-mode. In the example illustrated in FIG. 1, a picture of a coding target is referred to as CurrPic (Current Picture), and this CurrPic is set as B picture where the bi-directive prediction is carried out. Also, a picture of Ref_idex=0 in the List1 direction of the CurrPic which is the already coded picture is referred to as colPic (co-located Picture).
In the colPic, a motion vector used for coding an MB located at a same position as the MB of the coding target is referred to as mvCol (reference vector). A picture referred to by this mvCol is referred to as refPicCol. A time distance between the colPic and the refPicCol is referred to as td, and a time distance between the currPic and the refPicCol is referred to as tb.
Herein, the motion vectors from the CurrPic to the refPicCol and ColPic are subjected to scaling of a time allocation of the mvCol, and the obtained temporal direct vectors mvL0 and mvL1 are used as prediction vectors of the relevant block. The time allocation is calculated by a difference of POC (Picture Order Count: a display order of Picture).
The temporal direct vector is calculated by the following expression. mvL0=((tb/td)×Vx, (tb/td)×Vy):tb/td-fold mvL1 of mvCol=a difference between mvL0−mvCol:mvL0 and mvCol. Herein, mvCol=(Vx, Vy).
To increase the prediction efficiency of the motion vector in this temporal direct-mode, a technology of setting the motion vectors in the temporal direct-mode on a straight line is proposed.
It should be noted that in general, a way of preparing the motion vectors used in the direct-mode is decided by a value of direct—8×8_inference_flag of SPS (Sequence_parameter_set). For example, in the case of direct—8×8_inference_flag=1, the motion vectors used in the direct-mode are prepared in the unit of 8×8, and in the case of direct—8×8_inference_flag=0, the motion vectors used in the direct-mode are prepared in the unit of 4×4.
FIG. 2 is an explanatory diagram for describing the spatial direct-mode. In the spatial direct-mode, the mvCol is used in the same manner as the temporal direct-mode, but as illustrated in FIG. 2, the mvCol is used only for a static dynamic determination. In the spatial direct-mode, in a case where it is determined as static, 0 vector is set, and in a case where it is determined as dynamic, a prediction vector is generated from a motion vector of a motion vector in a peripheral block in the coding target picture (in the space).
In the example illustrated in FIG. 2, when it is determined as dynamic, an intermediate value of the motion vectors in the peripheral MB (top, upper left, and left) of the coding target is set as a spatial direct vector. For example, the spatial direct vector is set as fmvU and bmvUR. The reference picture is a smallest value of the peripheral MB.
In recent years, as a Multi-view Video Coding (MVC), a coding dealing with a multi-view is standardized as an extension of H.264. A stereoscopic view-corresponding coding is the case of two eyes of the MVC. In general, a left-view image of two eyes is referred to as Base-View, and a right-view image is referred to as non-Base-view. The Base-View is an image in which the inter prediction is closed in a view point of its own. According to the MVC, an inter-view prediction that is a prediction between different view points is added in addition to the prediction coding in a time direction (within the same view point) in related art. The inter-view prediction is designed to carry out an inter-view prediction at a same time (POC).
According to Japanese Laid-open Patent Publication No. 2005-110289 and Japanese National Publication of International Patent Application No. 2009-509454, in the technology of the MVC, a technology is disclosed in which when a disparity vector is predicted, disparity vectors with respect to the predetermined number of previously coded macro blocks are predicted, and the disparity vector is calculated by utilizing the predicted disparity vectors.